Helpful Information
 
 
Category: Applet
Applet --> Servlet

Hi! I'm experiencing the use of applets since few weeks, and read a bit on what u can and cannot do. I want users to enter text in textfields and then write it on the host server disk in a txt file. I thought the simplest solution is, without breaking the sandbox, getting information from the applet, and then sending it to the servlet so that it writes it on my host server.

WHAT would be the minimum necessary code/steps to complete this ? Im not asking for the entire code, only good hints so I don't loose to much time working in the wrong direction...plz.

exemple: Do I need to send a variable containing the text entered by the user, from the applet to the servlet, if yes, how, with parameters?...is html code needed to complete the conversation between applet and servlet for sending info to each other? Or javascript ? ...as u can see, I don't know that much yet on that subject!

Tx

I have a question. Do you already have an applet running, is this why you want to use an applet? To me it seems like if all you're doing is getting information from the user by way of a form, you can simply use the servlet and disregard the applet.


infoThisty

My applet isn't completed yet, but it's under construction...
To answer u, I'll ask u a question....can I create a GUI like applets do with servlets ?? I thought only applets could use GUI...what would be the benefits of using applets then? Can I really do everything with only one servlet? (GUI, getting user info., writing that info over my server,...) ?

Tx

As infothirsty has already pointed out surely an html form is what you want?


--
http://www.radinks.net/ftp/applet/
An applet that breaks all the rules.

hmmm...im not sure what you mean here...an html form? Isn't a servlet done with java.....why html form?

Your question is can you use a gui in a servlet? No you can't, but how much are you doing that you need a gui? Do you want to use a Gui because it looks nice? Like we've said, you could do all you want to accomplish with a simple html form and send the data to the servlet through the form.

All you're doing is getting info from the user, we're assuming you'll do this through a form. Then all you have to do is send the data from the form to the servlet (this would be done in the form's Action tag, if my memory serves me right.)

To me it seems easier to work with an html form and send the data to the servlet, instead of working with an applet. Applets are kind of old and slow, my preference would be to simply use the form and a servlet to process your data. Just read up on forms and servlets ... i think you'll find it easier to work with.



--infoThirsty

Hope i didn't confuse you.

Wow! infoThirsty, this time, everything is clear! Thank you so much! I'll probably be ok with those explanations...










privacy (GDPR)